module.exports = {
  chainWebpack: (config) => {
    config.module
      .rule('jsx')
      .test(/\.jsx?$/)
      .use('babel-loader')
      .loader('babel-loader')
      .options({
        presets: [
          '@babel/preset-env',
          [
            '@vue/babel-preset-jsx',
            {
              functional: false, // 确保支持非函数式组件
            },
          ],
        ],
      });
  },
};
